#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QDebug>
#include <QDir>
#include <QFileInfoList>
#include <QLibrary>
#include <QMessageBox>
#include "CarPosHMS_global.h"
#include "manager.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE
typedef void* (*pDllGetPluginRobotVector)();
#define ID_ROBOT_BASE   1000
class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    void assembeRobot();
    Robot *createRobot();
private slots:
    void ReceiveRobot(unsigned char* data, int nLength);

public slots:
    void ReceiveVisual(unsigned char* data, int nLength);

signals:
    void SendToVisual(unsigned char* data, int nLength);

private:
    Ui::Widget *ui;
    QLibrary _myLib;

    //机器人对象
    static Robot *_Robot;

    VecRobotInfo m_vecRobotInfo;
};
#endif // WIDGET_H
